home *** CD-ROM | disk | FTP | other *** search
- (***************************************************************************
-
- $RCSfile: BattMem.mod $
- Description: Interface to battmem.resource
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.7 $
- $Author: fjc $
- $Date: 1995/01/26 02:39:55 $
-
- Includes Release 40.15
-
- (C) Copyright 1985-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A interface Copyright © 1994-1995, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- ***************************************************************************)
-
- <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
-
- MODULE [2] BattMem;
-
- <*$ CaseChk- IndexChk- LongVars+ NilChk- *>
- <*$ RangeChk- StackChk- TypeChk- OvflChk- *>
-
- IMPORT SYS := SYSTEM, e := Exec;
-
-
- (*
- ** $VER: battmem.h 36.4 (1.5.90)
- **
- ** BattMem resource name strings.
- *)
-
- CONST
-
- battMemName * = "battmem.resource";
-
-
- (*
- ** $VER: battmembitsamiga.h 39.3 (14.9.92)
- **
- ** BattMem Amiga specific bit definitions.
- *)
-
-
- (*
- * Amiga specific bits in the battery-backedup ram.
- *
- * Bits 0 to 31, inclusive
- *)
-
- (*
- * AmigaAmnesia
- *
- * The battery-backedup memory has had a memory loss.
- * This bit is used as a flag that the user should be
- * notified that all battery-backed bit have been
- * reset and that some attention is required. Zero
- * indicates that a memory loss has occured.
- *)
-
- amigaAmnesiaAddr * = 0;
- amigaAmnesiaLen * = 1;
-
-
- (*
- * scsiTimeout
- *
- * adjusts the timeout value for SCSI device selection. A
- * value of 0 will produce short timeouts (128 ms) while a
- * value of 1 produces long timeouts (2 sec). This is used
- * for SeaCrate drives (and some Maxtors apparently) that
- * don`t respond to selection until they are fully spun up
- * and intialised.
- *)
-
- scsiTimeoutAddr * = 1;
- scsiTimeoutLen * = 1;
-
-
- (*
- * scsiLuns
- *
- * Determines if the controller attempts to access logical
- * units above 0 at any given SCSI address. This prevents
- * problems with drives that respond to ALL LUN addresses
- * (instead of only 0 like they should). Default value is
- * 0 meaning don't support LUNs.
- *)
-
- scsiLunsAddr * = 2;
- scsiLunsLen * = 1;
-
-
- (*
- ** $VER: battmembitsamix.h 1.1 (25.5.90)
- **
- ** BattMem Amix specific bit definitions.
- *)
-
-
- (*
- * See Amix documentation for these bit definitions
- *
- * Bits 32 to 63, inclusive
- *)
-
- (*
- ** $VER: battmembitsshared.h 39.2 (4.6.93)
- **
- ** BattMem shared specific bit definitions.
- *)
-
-
- (*
- * Shared bits in the battery-backedup ram.
- *
- * Bits 64 and above
- *)
-
- (*
- * sharedAmnesia
- *
- * The battery-backedup memory has had a memory loss.
- * This bit is used as a flag that the user should be
- * notified that all battery-backed bit have been
- * reset and that some attention is required. Zero
- * indicates that a memory loss has occured.
- *)
-
- sharedAmnesiaAddr * = 64;
- sharedAmnesiaLen * = 1;
-
-
- (*
- * scsiHostID
- *
- * a 3 bit field (0-7) that is stored in complemented form
- * (this is so that default value of 0 really means 7)
- * It's used to set the A3000 controllers SCSI ID (on reset)
- *)
-
- scsiHostIdAddr * = 65;
- scsiHostIdLen * = 3;
-
-
- (*
- * scsiSyncXfer
- *
- * determines if the driver should initiate synchronous
- * transfer requests or leave it to the drive to send the
- * first request. This supports drives that crash or
- * otherwise get confused when presented with a sync xfer
- * message. Default=0=sync xfer not initiated.
- *)
-
- scsiSyncXferAddr * = 68;
- scsiSyncXferLen * = 1;
-
- (*
- * scsiFastSync
- *
- * determines if the driver should initiate fast synchronous
- * transfer requests (>5MB/s) instead of older <=5MB/s requests.
- * Note that this has no effect if synchronous transfers are not
- * negotiated by either side.
- * Default=0=fast sync xfer used.
- *)
-
- scsiFastSyncAddr * = 69;
- scsiFastSyncLen * = 1;
-
- (*
- * scsiTagQueues
- *
- * determines if the driver should use SCSI-2 tagged queuing
- * which allows the drive to accept and reorder multiple read
- * and write requests.
- * Default=0=tagged queuing NOT enabled
- *)
-
- scsiTagQueuesAddr * = 70;
- scsiTagQueuesLen * = 1;
-
-
- (**-- Resource Base variable --------------------------------------------*)
-
- VAR
-
- base * : e.APTR;
-
-
- (**-- Resource Functions ------------------------------------------------*)
-
- (*
- ** $VER: battmem_protos.h 1.5 (4.3.91)
- *)
-
- PROCEDURE ObtainBattSemaphore* [base,-6] ();
- PROCEDURE ReleaseBattSemaphore* [base,-12] ();
- PROCEDURE ReadBattMem* [base,-18]
- ( VAR buffer [8] : ARRAY OF SYS.BYTE;
- offset [0] : e.ULONG;
- length [1] : e.ULONG )
- : e.ULONG;
- PROCEDURE WriteBattMem* [base,-24]
- ( buffer [8] : ARRAY OF SYS.BYTE;
- offset [0] : e.ULONG;
- length [1] : e.ULONG )
- : e.ULONG;
-
- BEGIN base := NIL
- END BattMem.
-